/* 
 * File:   AnimationPool.cpp
 * Author: jcdenton
 * 
 * Created on July 3, 2010, 10:59 AM
 */

#include "AnimationPool.hpp"
#include <iostream>

AnimationPool::AnimationPool()
{
    this->_animationMap = new std::map<std::string, Animation*>();
    this->_strtmp = new std::string();
    #ifdef LINUX
    this->_animationDir = new std::string("img/");
    #else
    this->_animationDir = new std::string("img\\");
    #endif
}

AnimationPool::~AnimationPool()
{
}

void AnimationPool::loadAnimation(const std::string& path,
            int frameWidth,
            int frameHeight,
            bool isInfinite,
            int animationSleep)
{
    (*this->_strtmp) = (*this->_animationDir) + path;
    (*this->_animationMap)[path.substr(0,path.find_last_of("."))] =
            new Animation(path, frameWidth, frameHeight, 
            isInfinite, animationSleep);
}

const Animation& AnimationPool::getAnimation(const std::string&)
{
    
}

